package game.adm.entity;

import game.adm.dao.ChargeDAO;
import game.adm.dao.dto.ChargeDTO;
import game.adm.dao.factory.ChargeFactory;
import game.adm.struts.form.ChargeForm;

import java.util.List;

import projectx.core.base.ProjectXSystemException;
import projectx.core.base.ProjectXUserException;

public class ChargeEntityManager {
	
	public static boolean update(String id,String orderStatus,String updateip) throws ProjectXSystemException,
			ProjectXUserException {
		ChargeFactory factory = ChargeFactory.getFactory();
		ChargeDAO dao = factory.getChargeDAO();
		return dao.update(id, orderStatus,updateip);
	}
	
	public static ChargeDTO getChargeByID(String id) throws ProjectXSystemException,
			ProjectXUserException {
		ChargeFactory factory = ChargeFactory.getFactory();
		ChargeDAO dao = factory.getChargeDAO();
		return dao.getChargeByID(id);
	}
	
	public static List<ChargeDTO> list(ChargeForm chargeForm) throws ProjectXSystemException,ProjectXUserException {
		ChargeFactory factory = ChargeFactory.getFactory();
		ChargeDAO dao = factory.getChargeDAO();
		return dao.list(chargeForm);
	}
}
